package main
import (
	"golang.org/x/net/context"
	"google.golang.org/grpc"
	"git.oschina.net/YPTArch/appcenter/grpc/pd"
		"fmt"
)

const (
	address     = "192.168.1.100:10001"
)

func main() {
	// Set up a connection to the server.
	conn, err := grpc.Dial(address, grpc.WithInsecure())
	if err != nil {
		fmt.Printf("did not connect: %v", err)
	}
	defer conn.Close()
	c := pb.NewApplicationClient(conn)
	// Contact the server and print out its response.

	r, err := c.GetApplication(context.Background(), &pb.ApplicationRequest{AppId: "dsfadafsdsfads1213fdsafdasfa"})
	if err != nil {
		fmt.Printf("could not greet: %v", err)
	}
	fmt.Printf("Greeting: %s", r.AppName)

}
